home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util4 / change.lha / Change / Change.doc < prev    next >
Text File  |  1995-12-31  |  7KB  |  184 lines

  1.                     Change Version 2.10 (31.12.95)
  2.  
  3. This program gives you the ability to search for different strings in files
  4. and to replace them with other string. The file could be binary or ascii.
  5. An example is if you change your harddisk and then most of the old path
  6. names also change. Normally you have to do this file for file at hand. With
  7. change it's much more easier! Only use change in a script with all (or all
  8. needed) files and the replacement is done.
  9.  
  10. Change is programmed with MaxonC++ V3.00 (but mostly in Ansi-C) and it's
  11. Public Domain. I give all rights of the program to the user, but the same
  12. way I give no guarantee that the program works well. Use it of your own
  13. risk!
  14.  
  15. Since version 2.0 Change has a graphical GUI. The elements of the GUI are
  16. the same like the Shell arguments! You can start Chnage with GUI from WB
  17. or from Shell without arguments. If you give arguments in the shell, Change
  18. will work with this arguments without openening a window!
  19.  
  20. Since version 2.3 the Shell arguments are read with ReadArgs. This means,
  21. that their are some changes to earlier versions.
  22.  
  23. The history of the program is in the source code -> source/Change/Change.c
  24.  
  25. If you call Change with ?(»Change ?«) you get the following argument list:
  26.  
  27. FROM/A,SSTRING/A,TO,RSTRING,FOUND/S,HEX/S,LENGTH/S,NOCHANGE/S,NOSIZE/S,
  28. OVERWRITE/S,PATH/S,POS=POSITION/K:
  29.  
  30. Enter again a ? and you will get a better explanation.
  31.  
  32. With »Version Change FULL« you get the actual version of this program.
  33. Thats usefull for updating.
  34.  
  35. Explanation of arguments:
  36. FROM        the already existing file Change should work with
  37.         > needed every time !
  38. SSTRING        is the string Change should search for
  39.                 > needed every time !
  40. TO        the file Change should write to
  41.         if it's the same like FROM (or their is no TO) it will be
  42.         overwritten! (only if there is enough memory to load it,
  43.         else the name will get _ at the end)
  44.                 > needed every time (not with option NOCHANGE)
  45. RSTRING        is the replacement for SSTRING
  46.                 > not needed, if not given an empty string is used
  47. FOUND           gives you  every tim SSTRING is found or changed a output
  48.         (for example: String found at 32C). The number is the hexa-
  49.         decimal code of the position.
  50.                 > not needed, of no use with NOCHANGE
  51. HEX             gives you the posibility to enter the strings as hex
  52.         numbers. (Some chars can't be entered with the keyboard -
  53.         RETURN - 0A for example)
  54.                 > not needed
  55. LENGTH          changes the length information of a BCPL string (first
  56.         character contains length of string)
  57.                 > not needed, of no use with NOCHANGE and same length of
  58.                 of the strings, idiotic with a normal C-string (with 0 at
  59.                 end)
  60. NOCHANGE        turn of the replacement, only search SSTRING like Search
  61.         command in C:, Option FOUND automatical turned on
  62.         > not needed, Options TO, LENGTH, OVERWRITE, PATH, RSTRING
  63.         not useable
  64. NOSIZE          scan case insensitiv
  65.                 > not needed
  66. OVERWRITE       If RSTRING is longer than SSTRING the chars after RSSTRING
  67.         will be replaced, if RSTRING is shorter, the rest will be
  68.         filled with 0. This option is useful if you change strings
  69.         in executable filles, because the length can't be changed
  70.                 > not needed, of no use with same length of the strings
  71. PATH            Option to replace path names. It's like overwrite, but the
  72.         filling or overwriting starts first, when a 0 is found after
  73.         the replacement!
  74.                 > turned of with OVERWRITE or same length of strings
  75. POS             see POSITION
  76. POSITION        After POSITION you have to give a hex number of the position
  77.         you want to change sstring. If there is no sstring at this
  78.         position no replacement would be done. A position you can
  79.         get before that with the option NOCHANGE
  80.                 > not needed, of no use with NOCHANGE
  81.  
  82.  
  83. If you give no keywords, the first string is FROM, the second SSTRING, the
  84. third TO and the fourth RSTRING.
  85.  
  86. Change also works with a pattern. If there is a \? in the text (or a ? in
  87. HEX mode) at this position every char will be accepted!
  88. Important:
  89.     \? is the pattern
  90.     \\ means one \ ane
  91.     \  and after this a hex number with 2 digits means the char given
  92.     through the ascii-code(\57 is a W)
  93.         
  94. (see the examples)
  95. If you enter strings with HEX option all chars of no use are ignored. Only
  96. (0..9 a..f A..F ?) will be recognized. This means you can enter slashes
  97. between the chars to make it better visible.
  98. 123a4b52349f009a is the same as 123a_4b52_349f_009a or 123a.4b52.349f.009a
  99. or 1-2-3-a-4-b-5-2-3-4-9-f-0-0-9-a.
  100.  
  101. At the program start Change tells you the two strings it works with.
  102. Chars from 20 to 7E and from A1 to FF will be shown like given. 
  103. . means a non printable char and
  104. _ means a pattern.
  105.  
  106. At the end the program gives you a status report of the done work:
  107. String ... times found and ... times changed
  108.  
  109. Examples:
  110. You want to search in the file SYS:Texts/S the name Intel:
  111. --> Change SYS:Texts/S Motorola NOCHANGE
  112.  
  113. With hex option it looks like this:
  114. --> Change SYS:Texts/S 496E74_656C NOCHANGE HEX
  115.  
  116. If you want to change Intel to Motorola you must give me a destination
  117. (SYS:Texts/S2) and remove NOCHANGE:
  118. --> Change SYS:Texts/S Intel SYS:Texts/S2 Motorola
  119.  
  120. With NOSIZE  you can also scan for intel, InTeL, INTEL and other forms,
  121. FOUND shows you the position of the string:
  122. --> Change SYS:Texts/S Intel SYS:Texts/S2 Motorola NOSIZE FOUND
  123.  
  124. Use the CD command before that, so the arguments will be shorter
  125. Befehl:
  126. --> CD SYS:Texts
  127.     Change S Intel S2 Motorola NOSIZE FOUND
  128.  
  129. If you want to replace wrong written word MoToRoLa or motorola with the 
  130. capitalized version Motorola, use this (remember NOSIZE doesn't change the
  131. destination string):
  132. --> Change S motorola S2 Motorola NOSIZE
  133.  
  134. If Intel should be replaced only at one position so use POSITION:
  135. --> Change S Intel S2 Motorola POSITION D3 NOSIZE
  136.  
  137. Alternativly use POS:
  138. --> Change S Intel S2 Motorola POS D3 NOSIZE
  139.  
  140. If the strings contain spaces use "":
  141. --> Change S "Intel is good" S2 "Motorola is better"
  142.  
  143. You can also delete the SSTRING in the file:
  144. --> Change S Intel S2 ""            or
  145. --> Change S Intel S2
  146.  
  147. If you want to replace words, which don't differ very much (Disk and Disc
  148. with discette) so use a Pattern:
  149. --> Change S Dis\? S2 discette
  150.  
  151. or
  152.  
  153. --> Change S 446973? S2 64697363_65747465
  154.  
  155. If you want to search for a \ so enter they every time twice. (6 instead
  156. of 3 ...)
  157. --> Change S \\ S2 /            --> changes \ to /
  158.  
  159. --> Change S \\\\ S2 //         --> changes \\ to //
  160.  
  161. --> Change S \\? S2 /?          --> changes \? to /? (no pattern !)
  162.  
  163. but rememeber:
  164.  
  165. --> Change S \? S2 /?           --> changes every char to /?
  166.  
  167. If SSTRING is "" an error appears.
  168.  
  169. Plans for the future:
  170.  
  171. The pattern * for a variable number of chars or the standard Amiga patterns,
  172. like #, ~, ().
  173. Localisation and for with this german texts(The OS errors are already
  174. localized by the OS!)
  175.  
  176. Comments, wishes, money (its Public Domain, but why not), greetings and
  177. bug reports to
  178.  
  179. snail-mail:    Dirk Stöcker
  180.         Geschwister-Scholl-Straße 10
  181.         01877 Bischofswerda
  182.         GERMANY
  183. e-mail:        stoecker@rcs1.urz.tu-dresden.de
  184.